package com.dominator.service;

import com.dominFramework.core.typewrap.Dto;
import com.dominator.utils.api.ApiMessage;
import com.dominator.utils.exception.ApiException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface ApiCommonService {


    /**
     *  获取openId
     * @param pDto
     * @return
     */
    ApiMessage getWxUserOpenId(Dto pDto) throws ApiException;




    /**
     * 微信下单
     * @param pDto
     * @return
     */
    ApiMessage weixinCreateOrder(Dto pDto) throws ApiException;



    /**
     * 微信回调
     * @param request
     * @return
     */
    ApiMessage wexinCallBack(HttpServletRequest request) throws ApiException;

    /**
     * 获取公众号配置
     * @return
     * @throws ApiException
     */
    ApiMessage getWxConfig(Dto dto) throws ApiException;



    /**
     * 获取微信支持银行卡列表
     * @return
     * @throws ApiException
     */
    ApiMessage getWechatBankList() throws ApiException;


    /**
     * 获取用户微信信息
     * @param dto
     * @return
     * @throws ApiException
     */
    ApiMessage getUserInfoByOpenId(Dto dto) throws ApiException;

    /**
     *  测试
     * @param pDto
     * @return
     */
    ApiMessage test(Dto pDto) throws ApiException;


    /**
     * 上传图片
     * @param multipartFile
     * @return
     */
    ApiMessage uploadPicture(MultipartFile multipartFile) throws ApiException;


    /**
     * 主页
     * @param
     * @return
     * @throws ApiException
     */
    ApiMessage homepage() throws ApiException;




    /**
     * 获取图像验证码
     * @return
     * @throws ApiException
     */
    ApiMessage getPicVerifyCode() throws Exception;

    /**
     * 验证图像验证码
     * @return
     * @throws ApiException
     */
    ApiMessage verifyPicCode(Dto dto) throws ApiException;





    /**
     * ocr识别图片
     * @param multipartFile
     * @return
     * @throws ApiException
     */
    ApiMessage ocrPicture(MultipartFile multipartFile) throws ApiException;





    /**
     * 商户转用户积分
     * @param dto
     * @return
     * @throws ApiException
     */
    ApiMessage transferPointsToUser(Dto dto) throws ApiException;

    /**
     * 微信上传小票，传七牛
     * @param dto
     * @return
     * @throws ApiException
     */
    ApiMessage ocrWeixinTicket(Dto dto) throws ApiException;

    /**
     * orc识别url图片
     * @param dto
     * @return
     * @throws ApiException
     */
    ApiMessage ocrPictureByUrl(Dto dto) throws ApiException;

    /**
     * ocr小票识别后添加积分
     * @param dto
     * @return
     * @throws ApiException
     */
    ApiMessage handleOcrResult(Dto dto) throws ApiException;


}
